import axios from 'axios'

import { IDeliveryDetails, IUpdateCardInfo } from '../interface'
import './__mock__'

/** 获取亚马逊信息 */
export const apiGetAmazonInfo = async (waybillNo: string): Promise<IDeliveryDetails> => {
  return axios.post(`/tmsapi/waybill_record/getAmazonInfo`, { waybillNo }).then(res => res.$data)
}

/** 更新卡片信息 */
export const apiUpdateCardInfo = async (params: IUpdateCardInfo): Promise<void> => {
  return axios.post(`/tmsapi/waybill_record/updateCardInfo`, { ...params }).then(res => res.$data)
}
